package com.example.helloandroidworld;

import android.app.DatePickerDialog.OnDateSetListener;
import android.app.DatePickerDialog;
import android.app.Dialog;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;


public class DatePickerFragment extends DialogFragment
{
	OnDateSetListener dateSet;
	
	public DatePickerFragment(){}
	
	public void setCallBack( OnDateSetListener ondate )
	{
		dateSet = ondate;
	}

	private int year, month, day;
	
	public void setArguments(Bundle args)
	{
		year = args.getInt("year");
		month = args.getInt("month");
		day = args.getInt("day");	
	}

	
	public Dialog onCreateDialog( Bundle savedInstanceState)
	{
		return new DatePickerDialog(getActivity(), dateSet, year, month, day);
	}
}